package com.osgix.authorize.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.osgix.authorize.model.UserRole;
import com.osgix.authorize.dao.UserRoleDao;
import com.osgix.authorize.service.UserRoleManager;
import com.osgix.common.orm.Page;
import com.osgix.common.orm.ibatis.EntityDao;
import com.osgix.common.service.BaseManager;
import com.osgix.common.service.AbsBaseManager;
import com.osgix.authorize.service.UserRoleManager;

import com.osgix.common.orm.ibatis.BaseIbatisDao;
import org.springframework.stereotype.Repository;

@Service("userRoleManager")
@Transactional
public class UserRoleManagerImpl extends AbsBaseManager<UserRole,Long> implements UserRoleManager{

	private UserRoleDao userRoleDao;
	
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	@Resource
	public void setUserRoleDao(UserRoleDao dao) {
		this.userRoleDao = dao;
	}
	
	public EntityDao getEntityDao() {
		return this.userRoleDao;
	}
	
	public void saveUserRole(UserRole userRole) {
		userRoleDao.save(userRole);
	}
	
	public void updateUserRole(UserRole userRole) {
		userRoleDao.update(userRole);
	}
	
	
}
